# frv testcase for callil @($GRi,$d12),$LI
# mach: all

	.include "testutils.inc"

	start

	.global callil
callil:
	set_gr_addr	ok2,gr8
	inc_gr_immed	-2047,gr8
	callil		@(gr8,0x7ff)
bad2:
	fail
ok2:
	test_spr_addr	bad2,lr

	set_gr_addr	ok3,gr8
	inc_gr_immed	2048,gr8
	callil		@(gr8,-2048)
bad3:
	fail
ok3:
	test_spr_addr	bad3,lr

	pass
